package {
	import com.googlecode.milib.dbg.SimpleTrace;	
	import com.googlecode.milib.vo.MLEvent;	
	import com.googlecode.milib.MILibMain;	
	
	import flash.display.MovieClip;
	
	/**
	 * @author Marek Brun 'minim'
	 */
	public class CreatingAndBroadcastingEvents extends MovieClip {

		private var someClassWithEvents:SomeClassWithEvents;
		
		public function CreatingAndBroadcastingEvents() {
			MILibMain.init(this);			MILibMain.getInstance().setupStandardStage();
			
			someClassWithEvents=new SomeClassWithEvents();
			someClassWithEvents.addEventListener(someClassWithEvents.event_IHazNewRandomNumber, onSomeClassWithEventsIHazNewRandomNumber);
		}

//********************************************************************************************
//		events for CreatingAndBroadcastingEvents
//********************************************************************************************
		protected function onSomeClassWithEventsIHazNewRandomNumber(event:MLEvent):void {
			SimpleTrace.trace('onSomeClassWithEventsIHazNewRandomNumber number:'+event.info.data);
		}
	}
}
